package edu.bit.water.service;

import java.sql.SQLSyntaxErrorException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.stereotype.Service;

import edu.bit.water.dao.MetaEvaWuseInfoAssociationDao;
import edu.bit.water.entity.MetaEvaWuseInfo;

@Service
public class MetaEvaWuseInfoAssociationService {

	@Autowired
	private MetaEvaWuseInfoAssociationDao metaEvaWuseInfoAssociationDao;
	
	/**
	 * 
	 * @param metaEvaWuseInfo 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 * @throws BadSqlGrammarException
	 */
	public int insertMetaEvaWuseInfoAssociation(MetaEvaWuseInfo metaEvaWuseInfo) throws BadSqlGrammarException{
		int n = metaEvaWuseInfoAssociationDao.insertMetaEvaWuseInfoAssociation(metaEvaWuseInfo);
		return n;
	}

	public int updateMetaEvaWuseInfoAssociation(MetaEvaWuseInfo metaEvaWuseInfo) throws BadSqlGrammarException{
		int n = metaEvaWuseInfoAssociationDao.updateMetaEvaWuseInfoAssociation(metaEvaWuseInfo);
		return n;
	}
	/**
	 * 
	 * @param metaEvaWuseInfo 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 */
	public int deleteMetaEvaWuseInfoAssociation(MetaEvaWuseInfo metaEvaWuseInfo) {
		int n = metaEvaWuseInfoAssociationDao.deleteMetaEvaWuseInfoAssociation(metaEvaWuseInfo);
		return n;
	}
}
